StupidBeauty
Read times:893Posted at:Sun Oct 6 19:31:33 2013
- no title specified

转载:Scaling multiple paths with raphael

当妳想要同时缩放多个元素,并且让它们缩放之后还保持相对位置关系时,则需要将它们的缩放中心指定为同一个点。具体对于raphael中元素的scale方法,缩放中心就是由第三个和第四个参数来指定的。scale(x,y, cx,cy )。

http://stackoverflow.com/questions/3352698/scaling-multiple-paths-with-raphael

亮点:

9 down vote accepted

scale can accept four parameters:

scale(x, y, cx, cy);

where cx and cy are coordinates of the centre of scaling. By default it is in the middle of the shape. So, to scale two shapes you need to scale then relative to the same centre.

share|improve this answer

answered Jul 29 '10 at 9:39

Dmitry Baranovskiy
1,10049

未知美人

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands